import com.sun.source.tree.BreakTree;

import java.util.Arrays;

public class test {
    //博哥写的
    public static boolean func2(int[] arrar){
        int count = 0;
        for (int i = 0; i < arrar.length; i++) {
            if(arrar[i] % 2 != 0){
                count++;
                if(count == 3){
                    return true;
                }
            }else{
                count = 0;
            }
        }
        return false;
    }
    public static void main(String[] args) {
        int[] array = {1,2,3,4,5,7,9};
        boolean ret = func2(array);
        System.out.println(ret);
    }
    //我写的
    public static boolean func(int[] array){
        int count = 0;
        boolean ret ;
        for (int i = 0; i < array.length; i++) {
            if(array[i] % 2 != 0){
                count ++;
            }else {
                count = 0;
            }
        }if(count == 3){
            ret = true;
            System.out.println(ret);
        }else {
            ret = false;
            System.out.println(ret);
        }
        return ret;
    }
    public static void main2(String[] args) {
        int count = 0;
        int[] array = {1,2,3,4,5,7,9};
        boolean outcome = func(array);
        System.out.println(outcome);
    }
    public static void main1(String[] args) {
        int[] array = {1,2,2,3,2,2};
        Arrays.sort(array);
        System.out.println(Arrays.toString(array));
        System.out.println(array[array.length / 2]);
    }
}
